file = '../NFs/ids_rules.txt'

lines = set()
with open(file, 'r') as f:
    for line in f:
        _line = line.replace(' ', '\t', 7)
        lines.add(_line)

print(lines)
_file = file = '../NFs/ids_rules.csv'
with open(_file, 'w', encoding='utf-8') as f:
    for line in lines:
        f.write(line)

file = '../NFs/fw_rules.csv'

lines.clear()
with open(file, 'r') as f:
    for line in f:
        _line = '\t'.join([i.strip() for i in line.split('\t')])
        lines.add(_line + '\n')
print(lines)

with open(file, 'w', encoding='utf-8') as f:
    for line in lines:
        f.write(line)
